def test(numRows: int):
     list = [[] for _ in range(numRows)]
     print(list)

def generate(numRows: int):
        list = [[] for _ in range(numRows)]
        list[0].append(1)
        i = 1
        while i<=numRows-1:
            for j in range(i+1):
                if j == 0 or j == i:
                    list[i].append(1)
                else:
                    list[i].append(list[i-1][j-1]+list[i-1][j])
            i += 1
        return list

if __name__ == "__main__":
    numRows = 5
    print(generate(numRows))
    #test(numRows)